<template>
  <div class="no">
    <div class="no-bd">
      <ul>
        <li>服务人数</li>
        <li>志愿时长</li>
      </ul>
    </div>
    <div class="no-hd">
      <ul>
        <li>{{ oldP.toFixed(0) }}<span>人</span></li>
        <li>{{ oldT.toFixed(1) }} <span>时</span></li>
      </ul>
    </div>
  </div>
</template>
<script>
import gsap from 'gsap'
export default {
  data() {
    return {
      chartInstance: [null, null, null],
      allData: null,
      oldP: 0,
      oldT: 0
    }
  },
  created() {
    this.changePT(64036, 38260)
  },
  // mounted() {
  //   this.initChart()
  // },
  methods: {
    changePT(newP, newT) {
      console.log(1666)
      gsap.to(this, {
        duration: 7,
        oldP: newP,
        oldT: newT
      })
    }
  }
}
</script>
<style lang="less" scoped>
.no {
  background-color: rgba(129, 0, 0, 0.8);
  border: 1px solid rgb(255, 0, 14);
  padding: 0.125rem;
  width: 100%;
  height: 16vh;
  .no-bd {
    ul {
      display: flex;
      li {
        flex: 1;
        color: rgba(255, 255, 255, 0.86);
        text-align: center;
        font-size: 20px;
        height: 0.5rem;
        line-height: 0.5rem;
        padding-top: 0.125rem;
        font-weight: 550;
      }
    }
  }
  .no-hd {
    position: relative;
    // border: 1px solid #fff;
    &::before {
      position: absolute;
      top: 0;
      left: 0;
      content: '';
      width: 30px;
      height: 10px;
      border-left: 2px solid rgb(227, 93, 28);
      border-top: 2px solid rgb(227, 93, 28);
    }
    &::after {
      position: absolute;
      bottom: 0;
      right: 0;
      content: '';
      width: 30px;
      height: 10px;
      border-right: 2px solid rgb(227, 93, 28);
      border-bottom: 2px solid rgb(227, 93, 28);
    }
    ul {
      display: flex;
      li {
        position: relative;
        flex: 1;
        line-height: 1rem;
        font-size: 0.875rem;
        color: #ffeb7b;
        text-align: center;
        font-family: 'electronicFont';
        &::after {
          content: '';
          position: absolute;
          top: 25%;
          right: 0;
          height: 50%;
          width: 1px;
          background-color: rgba(255, 255, 255, 0.2);
        }
      }
    }
  }
  .no-title-charts {
    ul {
      display: flex;
      li {
        flex: 1;
        color: rgba(255, 255, 255, 0.7);
        text-align: center;
        font-size: 0.25rem;
        height: 0.5rem;
        line-height: 0.5rem;
        padding-top: 0.125rem;
      }
    }
  }
  .no-charts {
    ul {
      display: flex;
      height: 95px;
      li {
        padding-top: -0.625rem;
        flex: 1;
        text-align: center;
      }
    }
  }
}
</style>
